<?php /* Smarty version 2.6.18, created on 2010-03-09 13:53:23
         compiled from user_maintenance.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'cycle', 'user_maintenance.tpl', 39, false),)), $this); ?>
<div id="main_content">

	<h1>User Maintenance</h1>
	<form name="MainQuery" method="POST" action="">
		<table width="100%" class="blue">
			<tr>
				<td width="15%"><label><b>Account Type:</b></label></td>
				<td>
					<select name="user_groups">
					<option value=""> --- </option>
					<?php $_from = $this->_tpl_vars['ugroups']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['group']):
?>
						<option value="<?php echo $this->_tpl_vars['group']['user_group_code']; ?>
">
							<?php echo $this->_tpl_vars['group']['name']; ?>

						</option>
					<?php endforeach; endif; unset($_from); ?>
					</select>
				</td>
				<td align="right">
					<input type="button" value="Go" onclick="doajaxAction('/admin/systemUMFilter/group/'+document.MainQuery.user_groups.value,0,'data_table');">
				</td>
			</tr>
		</table>
		<br>
	</form>
	<div id="data_table">
		<form method="POST" action="/admin/SystemSaveListChanges">
			<div id="pageNavPosition" style="color:#84b5cc" width="100%"></div>
			<table width="100%" id="results">
				<tr bgcolor="#cccccc">
					<td width="5%"></td>
					<td width="4%"><label><b>Delete<b></label></td>
					<td><label><b>Username<b></label></td>
					<td><label><b>Full Name<b></label></td>
					<td><label><b>User Group<b></label></td>
					<td><label><b>Created by<b></label></td>
					<td><label><b>Date Enabled<b></label></td>
				</tr>
				<?php $_from = $this->_tpl_vars['results']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['result']):
?>
					<tr class="<?php echo smarty_function_cycle(array('values' => "blue,notify"), $this);?>
">
						<td align="center"><input type="button" value="Edit" name="edit_<?php echo $this->_tpl_vars['result']['id']; ?>
" id="edit_<?php echo $this->_tpl_vars['result']['id']; ?>
" onclick="edit_user(<?php echo $this->_tpl_vars['result']['id']; ?>
);"</td>
						<td align="center"><input type="checkbox" value="1" name="del_<?php echo $this->_tpl_vars['result']['id']; ?>
" id="del_<?php echo $this->_tpl_vars['result']['id']; ?>
"></td>
						<td><label><?php echo $this->_tpl_vars['result']['username']; ?>
</label></td>
						<td><label><?php echo $this->_tpl_vars['result']['last_name']; ?>
, <?php echo $this->_tpl_vars['result']['first_name']; ?>
 <?php echo $this->_tpl_vars['result']['middle_name']; ?>
</label></td>
						<td><label><?php echo $this->_tpl_vars['result']['group_name']; ?>
</label></td>
						<td><label><?php echo $this->_tpl_vars['result']['created_by']; ?>
</label></td>
						<td><label><?php echo $this->_tpl_vars['result']['date_enabled']; ?>
</label></td>
					</tr>
				<?php endforeach; endif; unset($_from); ?>
				<tr>
					<td colspan="3">
						<input type="button" value="Add User" onclick="edit_user(0);">
						<input type="submit" value="Save Changes">
					</td>
				</tr>
			</table>
			<script type="text/javascript"><!--
					var pager = new Pager('results', 10); 
					pager.init(); 
					pager.showPageNav('pager', 'pageNavPosition'); 
					pager.showPage(1);
			</script>
		</form>
	</div>
</div>
<?php echo '
<script language="javascript">
	function edit_user(id){
		doajaxAction(\'/admin/systemEditUser/id/\'+id,0,\'main_content\');
	}
</script>
'; ?>
